﻿using Microsoft.Xna.Framework;
using RainEngine.SceneNodes;

namespace RainEngine.Controllers
{
    /// <summary>
    /// 定义ISceneNode控制器
    /// </summary>
    public interface IController
    {
        /// <summary>
        /// 获取或设置enabled状态
        /// </summary>
        bool    Enabled { get; set; }

        /// <summary>
        /// 更新控制器，由ControllerAction()调用
        /// </summary>
        /// <param name="gameTime"></param>
        void    Update(GameTime gameTime);
        
        /// <summary>
        /// 链接一个控制器
        /// </summary>
        /// <param name="node">要链接的节点</param>
        void    AttachNode(SceneNode node);
        
        /// <summary>
        /// 移除控制器ISceneNode.
        /// </summary>
        void    DetachNode();

        /// <summary>
        /// 控制器逻辑
        /// </summary>
        /// <param name="gameTime"></param>
        void    ControllerAction(GameTime gameTime);
    }
}
